home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
pdox693.zip
/
TI550.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
3KB
|
133 lines
PRODUCT : PARADOX NUMBER : 550
VERSION : 3.x
OS : PC DOS
DATE : August 12, 1992 PAGE : 1/2
TITLE : CROSSTABS
Assuming that your table looks something like this:
TEST══╦══F1══╦══F2══╦══F3══╦═F4═╗
1 ║ y ║ n ║ n ║ x ║
2 ║ y ║ y ║ n ║ x ║
3 ║ y ║ n ║ y ║ x ║
4 ║ n ║ y ║ n ║ x ║
and the query looks like:
TEST╦══════════F1═══════════╦F2╦F3╦═════════════F4═══════════════╗
║y,calc count all as amt║ ║ ║calc "Y" as ans,calc f1 as fld║
║n,calc count all as amt║ ║ ║calc "N" as ans,calc f1 as fld║
║calc count all as amt ║y ║ ║calc "Y" as ans,calc f2 as fld║
║calc count all as amt ║n ║ ║calc "N" as ans,calc f2 as fld║
║calc count all as amt ║ ║y ║calc "Y" as ans,calc f3 as fld║
║calc count all as amt ║ ║n ║calc "N" as ans,calc f3 as fld║
will yield the following answer table:
ANSWER═╦══════Amt══════╦Ans═╦═Fld═╗
1 ║ 1 ║ N ║ f1 ║
2 ║ 1 ║ Y ║ f3 ║
3 ║ 2 ║ N ║ f2 ║
4 ║ 2 ║ Y ║ f2 ║
5 ║ 3 ║ N ║ f3 ║
6 ║ 3 ║ Y ║ f1 ║
You can change the sort order of the answer table. Use
F10/Modify/Sort on the answer table by the "Fld" as 1 and "Ans"
as 2 to yield:
ANSWER═╦══════Amt══════╦Ans═╦═Fld═╗
1 ║ 1 ║ N ║ f1 ║
2 ║ 3 ║ Y ║ f1 ║
3 ║ 2 ║ N ║ f2 ║
4 ║ 2 ║ Y ║ f2 ║
5 ║ 3 ║ N ║ f3 ║
6 ║ 1 ║ Y ║ f3 ║
PRODUCT : PARADOX NUMBER : 550
VERSION : 3.x
OS : PC DOS
DATE : August 12, 1992 PAGE : 2/2
TITLE : CROSSTABS
You could also rotate the answer table as follows:
ANSWER═╦═Fld═╦Ans═╦══════Amt══════╗
1 ║ f1 ║ N ║ 1 ║
2 ║ f1 ║ Y ║ 3 ║
3 ║ f2 ║ N ║ 2 ║
4 ║ f2 ║ Y ║ 2 ║
5 ║ f3 ║ N ║ 3 ║
6 ║ f3 ║ Y ║ 1 ║
Lastly, if you like, you could change this to a crosstab by
pressing F10/Image/Graph/Crosstab/Sum. Place the cursor in the
"Fld" field to assign this as the row labels, press <Enter>, move
right to the "Ans" field and press <Enter> to select it as the
column labels, and then move right once again and press <Enter>
to have the "Amt" values as the crosstab values to be calculated.
The result will be:
CROSSTAB╦═Fld═╦═══════N═══════╦═══════Y═══════╗
1 ║ f1 ║ 1 ║ 3 ║
2 ║ f2 ║ 2 ║ 2 ║
3 ║ f3 ║ 3 ║ 1 ║
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.